Skip to main content

DescribeSecurityGroupAttribute

Description

call DescribeSecurityGroupAttribute to query the security group rules of a security group.

Request Method

POST

Request Path

/apsara/route/Ecs/DescribeSecurityGroupAttribute

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
regionIdBODYstringYesNo sample value for this parameter.region id
SecurityGroupIdBODYstringYessg-bp1gxw6bznjjvhu3g***security group ID.
RegionIdBODYstringYescn-qingdao-env17-d01the region ID of the security group. You can call the DescribeRegions to view the latest Alibaba Cloud region list.
NicTypeBODYstringNointranetthe network card type of the security group rule. The value range of the classic network type security group: internet (default): public network intranet: intranet description a single call can only query the security group rules of 1 network card type. please query all types in two calls. the value range of the vpc type security group: intranet (default): intranet description if a internet or null value is passed in, it will be converted to intranet by default.
DirectionBODYstringNoallsecurity group rule authorization direction. Value range: egress: security group exit direction ingress: security group entry direction all: Do not distinguish directions default value: all.
versionBODYstringNo2016-01-01version of api

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}